<%--
  Created by IntelliJ IDEA.
  User: qintao30057
  Date: 2018/1/26
  Time: 9:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>编辑tab页</title>
    <%@ include file="../../../common/meta.jsp" %>
    <script src="${ctx}/js/plugins/validate/jquery.validate.custom.js?t=20181127"></script>
    <link href="${ctx}/css/page/common-win.css?t=${now}" rel="stylesheet">
    <style>
        #_btnDiv{
            height: 34px;
            margin-bottom: 0px;
        }
    </style>
    <script>
        var editType = '${type}';
        var oneTabInfo = ${oneTabInfo};
        var searchInfo = ${searchInfo};
    </script>
</head>
<body class="gray-bg">
<div>
    <div class="myContent">
        <div class="tabs-container">
            <div class="tab-content">
                <div id="tab-1" class="tab-pane active">
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="ibox float-e-margins myIbox">
                                <div class="ibox-content">
                                    <h5 class="page-header page-header-new"><i class="fa fa-file-text"></i>&nbsp;&nbsp;TAB页信息</h5>
                                    <form class="form-horizontal m-t" id="_tabDataForm">
                                        <c:choose>
                                            <c:when test="${type=='info'}">
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">TAB页名称：</label>
                                                    <label class="col-sm-8 control-label control-label-content">${not empty oneTabInfo ? oneTabInfo.tabName : ''}</label>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">TAB页编码：</label>
                                                    <label class="col-sm-8 control-label control-label-content">${not empty oneTabInfo ? oneTabInfo.tabCode : ''}</label>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">TAB页地址：</label>
                                                    <label class="col-sm-8 control-label control-label-content">${not empty oneTabInfo ? oneTabInfo.tabUrl : ''}</label>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">菜单：</label>
                                                    <label class="col-sm-8 control-label control-label-content">${not empty oneTabInfo ? oneTabInfo.menuName : ''}</label>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">排序：</label>
                                                    <label class="col-sm-8 control-label control-label-content">${not empty oneTabInfo ? oneTabInfo.sortNum : ''}</label>
                                                </div>
                                            </c:when>
                                            <c:otherwise>
                                                <div class="form-group form-group-new">
                                                    <label class="col-sm-2 control-label"><span style="color: red">*</span>TAB页名称：</label>
                                                    <div class="col-sm-8">
                                                        <input type="text" id="tabName" name="tabName" class="form-control" maxlength="20" required value="${not empty oneTabInfo ? oneTabInfo.tabName : ''}">
                                                        <span class="help-block m-b-none tip"></span>
                                                    </div>
                                                </div>
                                                <div class="form-group form-group-new">
                                                    <label class="col-sm-2 control-label"><span style="color: red">*</span>TAB页编码：</label>
                                                    <div class="col-sm-8">
                                                        <input type="text" id="tabCode" name="tabCode" class="form-control" maxlength="20" required value="${not empty oneTabInfo ? oneTabInfo.tabCode : ''}">
                                                        <span class="help-block m-b-none tip"></span>
                                                    </div>
                                                </div>
                                                <div class="form-group form-group-new">
                                                    <label class="col-sm-2 control-label"><span style="color: red">*</span>TAB页地址：</label>
                                                    <div class="col-sm-8">
                                                        <input type="text" id="tabUrl" name="tabUrl" class="form-control" maxlength="1000" required value="${not empty oneTabInfo ? oneTabInfo.tabUrl : ''}">
                                                        <span class="help-block m-b-none tip"></span>
                                                    </div>
                                                </div>
                                                <div class="form-group form-group-new">
                                                    <label class="col-sm-2 control-label"><span style="color: red">*</span>菜单：</label>
                                                    <div class="col-sm-8">
                                                        <select class="form-control" name="menuId" id="menuId" onchange="doChooseTab()" required>
                                                            <option value="">--请选择--</option>
                                                            <c:forEach items="${menuMap}" var="item">
                                                                <option value="${item.code}" ${not empty oneTabInfo && oneTabInfo.menuId == item.code ? 'selected' : '' } >${item.name}</option>
                                                            </c:forEach>
                                                        </select>
                                                        <span class="help-block m-b-none tip"></span>
                                                    </div>
                                                </div>
                                                <div class="form-group form-group-new">
                                                    <label class="col-sm-2 control-label">排序：</label>
                                                    <div class="col-sm-8">
                                                        <input type="text" id="sortNum" name="sortNum" class="form-control" maxlength="9" value="${not empty oneTabInfo ? oneTabInfo.sortNum : ''}" isPInteger="true">
                                                        <span class="help-block m-b-none tip"></span>
                                                    </div>
                                                </div>
                                            </c:otherwise>
                                        </c:choose>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="ibox float-e-margins">
            <div class="ibox-content">
                <div class="form-group" id="_btnDiv">
                    <div class="col-sm-4 col-sm-offset-5">
                        <c:if test="${type!='info'}">
                            <input type="button" class="btn btn-primary" onclick="doTabSave()" value="保存">
                        </c:if>
                        <input type="button" class="btn btn-white" onclick="doCheckDataChange()" value="返回">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctx}/js/sys/tab/win/editTabMgr.js?t=${now}"></script>
</body>
</html>

